//
//  ViewController.m
//  11105
//
//  Created by student on 16/2/29.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    UIImage *image=[UIImage imageNamed:@"bg"];
    UIImageView *imageView=[[UIImageView alloc]initWithImage:image];
    
    [self.scrollView addSubview:imageView];
    self.scrollView.contentSize=image.size;
    
    self.scrollView .showsHorizontalScrollIndicator=NO;
    self.scrollView .showsVerticalScrollIndicator=NO;
    
    for (int i=0; i<3; i++) {
           UIButton *button =[[UIButton alloc]initWithFrame:CGRectMake(40*i, 448, 40, 40)];
    }
    for (int i=0; i<2; i++) {
        UIButton *button =[[UIButton alloc]initWithFrame:CGRectMake(40*i, 488, 40, 40)];
    }
    for (int i=0; i<3; i++) {
        UIButton *button =[[UIButton alloc]initWithFrame:CGRectMake(40*i, 528, 40, 40)];
    }
 
    
    
}
-(void)addButton:(int)tag :(NSString *)name :(CGRect)frame
{
    if (tag<3)
    {
       UIButton *button =[[UIButton alloc]initWithFrame:CGRectMake(40*tag, 448, 40, 40)];
        button setImage:<#(nullable UIImage *)#> forState:<#(UIControlState)#>

    }
    else if(tag==3|tag==4)
    {
        UIButton *button =[[UIButton alloc]initWithFrame:CGRectMake(40*(tag-3), 488, 40, 40)];
    }
    else
    {
        
        UIButton *button =[[UIButton alloc]initWithFrame:CGRectMake(40*(tag-5), 528, 40, 40)];
    }

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
